Currently I'm in New York. I'm looking for a rooftop bar that provides a great overview about Manhattan, but is still affordable. (20 dollar for cocktail at maximum.) Additionally, I want to go there wearing jeans and a t-shirt, so nothing too fancy.
I don't recall any bars in NYC having a dress code, so T-Shirt and Jeans should be fine as long as you don't come in looking like a complete bum. Having said that there are quite a few rooftop bars. Here is the list of some of them that have menus available.
But you can simply look at the top 10 list(?) to pick the one you fancy the most.
The rooftop bar at Hotel Metro in midtown is unpretentious, cheap (by midtown standards), and gives you a pretty spectacular view of the Empire State building, though not a lot more (since you're more or less surrounded by tall buildings). They have no dress code.
Top of the Strand (at the Strand Hotel) is similar to Hotel Metro - same neighborhood, same view, same prices.
The Brass Monkey in Chelsea is great - laid back, awesome views, very casual, and reasonably priced.
Other than that, my advice is to avoid going to any of the "top-rated" places (unless it's a list of the top 10 "unpretentious" rooftop bars like in Karlson's answer ;), as those will tend to be both pricey and snobby. (FYI: $20 for a cocktail is definitely upscale pricing; mid-range bars will be more like $10-13 for a cocktail and $8-10 for beer.) Using review sites like Yelp will give you a good idea of places convenient for you (NYC is very big!) and will almost always give you a heads-up about unspoken dress codes, rooftops closed for renovations or the off-season, etc.
The Jimmy at the James Hotel in Soho is a beautiful place to get a drink.
So too is Le Bain atop the Standard in the Meatpacking District (probably my favorite rooftop in Manhattan).
But I say skip Manhattan and hop on the L to Williamsburg. The Wythe Hotel has one of the best rooftop bars in the 5 boroughs.
Anyway, isn't the view of Manhattan better than the view from it?