I get a lot of calls about birds - mainly crows or robins - 'attacking' or pecking at their windows. This is different from them slamming into the window when they do not see it. Robins - or any other bird really - may see their reflection in a window and falsely believe who they are seeing is another bird, not themselves. During breeding season, when hormones are increased, highly territorial birds (robins, corvids, peacocks) get very excited about other birds coming into the area they have decided will be their nest site.
Now, this is not stupid. Its smart. Most songbirds, like robins, feed their babies insects. This is true even of birds that will grow up to eat fruits or seeds, there is nothing with more protein than insects for baby birds. Since they must grow at a phenomenal rate to reach adult size in a matter of just a few weeks, their parents select out an area that they have assessed as being able to provide enough abundance of insects to feed their babies. The birds will base how large an area they need on how many insects...some tiny birds need only a yard or two, others acres.
If a robin has chosen your yard and location as a good site (yeah for you as they are very cool birds), then both parents will defend that area throughout the nesting period. That means that 'other' robin in the window is a real threat to them. The more energy and time they take to fight that guy, the less they spend with their babies or eggs or feeding. So, it is helpful for the bird for you to intervene and convince them that the bird they are seeing is gone.
First, we must impede the reflection. The reason our windows are so reflective now is from energy efficiency - the mirroring that window manufacturers put inside our windows to refract heat and retain warmth in winter. So any way you can think of to limit that reflectivity will work. This must be done from the outside of the house usually, though drawing down shades is always worth a try.
Here are some ideas. Go to "Living With" and also "Windows" for comprehensive lists of what to do to exclude birds.
1) Block the window for the breeding period. Use anything you want, decorate hangings, tarps, garbage bags, sheets, cardboard, or be creative and artistic.
2) Use colorful window paints that will wash off after the babies are mostly raised (2-3 weeks).
3) Put a full color large picture of a person on the outside of the window, perhaps laminate for it to last. (Don't bother with fake owls)
4) Hanging netting - this does NOT stop the reflection, but it may dissuade a bird from coming back. See instructions on Windows page. Must be placed at least 4-6 inches from the window. Plant hangars and eaves work great for this.
5) Any product you can paint on the window that will come off will work.
Remember - Robins have one of the most beautiful calls in the animal world. They have but 3-6 weeks to get their babies raised and ready for a harsh life as a wild bird.
Also, robins feed entirely on the ground, and the babies must learn to find food on the ground. They often are on the ground before they can fly well. Keeping cats and dogs away from your baby robins is critically important. Love your robins!