Is an airline obliged to refund the cost of a booked flight if the passenger is unable to fly because his tourist travel visa has been rejected? I am interested specifically in some sort of legal or professional obligation governing EU airlines in particular. My specific case is with British Airways.
No. It is your problem, not an airline problem.
You should do your homework early, e.g. to have a valid visa, and only after this you should book the flights and hotels.