Like SilverWarrior said, I'd create a classification of room types and only allow specific types to connect to each other. You must also take into account how the room exits must be aligned for everything to work properly. Then come the corner cases of no matching tiles - keep a dead end, or try to replace one of the neighbouring rooms? Also, if your maps are to serve some purpose (like a dungeon where you must find a certain chests) there must be a path from the start to the chest room.

I think it would be simplest to have a set of rooms - each room may have a different size, type, and a list of exits. You start generating the map with an exit/entrance tile, and then try to add neighbouring tiles to the existing map.