I would recommend to go in August, for the simple fact that you would get to experience all the "Verbenas" (La virgen de la Paloma, San Lorenzo and San Cayetano; it's some kind of very old festivals, with concerts in the streets, people dressed with the madrilian costumes...). In mid-June you have the Verbena de San Antonio.
As for tapas, I would recommend to go to the street called Callejón del Gato, near the Puerta del Sol, and have some "Patatas bravas". Very near you have a pub called "La fontana de Oro" in C/ Victoria, that is where the writers and intellectuals used to gather to discuss political matters back in the late 1800s. It's a bit expensive, but it's very nice.
Oh, and also in the Plaza de Santa Ana you have a hawaian bar called Mauna Loa, with budgies flying freely around, and fantastic coctails.
Again, it's a bit expensive, but it's worth the visit, plus they give you lotts of tapas, so you end up dining with those hehehe
Any questions, just send me a private message, I'm from Madrid myself
