Started with the passenger side headlight randomly going off while I was driving. Turning the lights on and off would fix the problem but it would soon go out again. how to fix it
There is an entire thread dedicated to this issue. I thought it was just my car (2005) ..started with my passenger headlight, and now either headlight will randomly go out, sometimes BOTH....I've been pulled over 4 times in that last 6 months! I'd suggest reading the important information in those threads. I filed a complaint with NHTSA today and will take some of the other measures suggested.
This is not a complicated issue. Install new bulbs. Both of them. Don't install some cheap chinese knock-off junk that you get from ebay or amazon for 10 bucks. Your 2005 (with HID lights based on your avatar) requires D2R model bulbs. Don't blame toyota, as this is most likely your fault. You've probably had one already going bad (blinking off) and never recognized it. Once the second one started failing, it appears as if both lights suddenly failed. Welcome to the world of HID headlights.