VLANs are often used with WiFi APs to provide multiple SSIDs, such as for a guest WiFi. Every device that the VLAN passes through must be configured for the same VLAN. So, if you're using VLAN 20, then pfsense, your managed switch and AP must all be configured for VLAN 20. The switch only has to have VLAN 20 enabled on the ports connecting to pfsense and the AP. You will also have to configure a DHCP server on the VLAN and configure appropriate rules.