One of those was the Science and Technology Select Committee which has the job of scrutinising institutions or policies. It produces reports with recommendations, to which Government has to respond. For example, a report on peer review in scientific publications or a report on practical experiments in school science lessons.
Another is the Parliamentary Office of Science and Technology (POST), which prepares information notes and packs for the members of parliament about the topics that they will be discussing and debating within the current term of Parliament. These reports can be browsed online, such as this report on women in science, engineering and technology. The reports aim to be party-neutral and fact-based (how they can do this, I don't know, when, as the saying goes, there are "lies, damned lies and statistics"). MPs will then use facts and figures from these reports in their debates.
And a third is the Government Office for Science (GO-Science), which seems to do everything else, from providing emergency response information (e.g. about flu pandemics or volcanic ash clouds), to providing views about the long term (what will life be like 20 years from now? what will we need to legislate about?). There are still more organisations (e.g. research councils, and the Parliamentary and Scientific Committee) and these are listed in this guide (which has a strangely unofficial-looking URL).
So there are lots of civil servants involved, and lots of committees. When these committees need to make reports, they invite expert opinion. They ask the learned societies (eg Royal Society of Chemistry, Royal Academy of Engineering, etc.) to suggest experts. They ask the research councils to suggest experts. They will also consider evidence submitted by scientists-at-large: if you have an expertise in an area they are investigating then you can make yourself known to them. After gathering written and oral evidence, they compile a report.
How do we, as scientists, know what's going to be discussed in Parliament in order to make ourselves known at the right time, to provide such evidence? That's not so easy. We can try to keep track of all the websites or feeds of the above committees. But really, we could do with having subject specific bodies such as the BCS, RAEng, RCS, etc aggregate that sort of information and push it out to us.