The formula you are seeking comes from the Shannon-Hartley theorem:
$$C=B\log_2\left(1+\frac{S}{N}\right)\tag 1$$
where C is the channel capacity in bits per second, B is the bandwidth in hertz, S is the signal power and N is the noise power.
The formula specifies the theoretical upper bound on the information rate for an arbitrarily low data error rate.
You can see from the formula that it is not simply a matter of the channel bandwidth but also the signal to noise ratio of the channel. Ham radio operators are enjoying digital exchanges where the noise power is greater than the signal power but this results in a very low channel capacity. It is still fascinating to make contact with a ham half way around the world with a signal than cannot even be heard above the static.
You also need to consider that a LiFi channel could have substantial overhead in the packets to accommodate routing, error checking, handshaking, etc. So the data portion of the transmission will be at a lower rate than the formula might first suggest.
Consider an LED light bulb where you can vary the color of the bulb from the color red (~450 THz) through to the color green (~550 THz) in order to transmit data. This provides an available bandwidth of 100 THz. That is 1 x 1014 hertz - a lot of bandwidth. The limitation in this case will not be the bandwidth of the channel but rather the capability of the transmit and receive electronics which will probably be limited to around 1 GHz of bandwidth or so with today's technologies. Whether or not this is a cost effective bandwidth for the consumer market is another matter.
In a LiFi application you must also consider that there is substantial interference from other light sources. Since these are not Gaussian noise sources, they cannot be plugged in the "N" part of equation 1. Instead, the system will likely need to include a robust CRC (Cyclic Redundancy Check) or equivalent in order to detect and correct for this interference. This feature will further reduce the bandwidth available for the actual data.