You may be able to take legal action against your employer in the following scenarios:
You have submitted a reasonable flexible working request and they have rejected it with no reason;
You have followed the statutory procedure for flexible working and your employer has refused to acknowledge this, or follow statutory procedure themselves.
There may be cause for a flexible working discrimination claim, depending on the actions of your employer following your request.