Buyer and Seller
An exchange traded option transaction has both a buyer and a seller. If there were not the two, the transaction would not take place.
I am curious how to gain insight into whether an option transaction was buyer or seller initiated, ie. "Buy to Open" or "Sell to Open".
Active vs Passive
In general (assuming US exchange traded options), one could look at the OPRA tick data for each transaction. If there was a posted offer to sell and that offer was hit and there was a corresponding decrease in size of the quote immediately after the transaction, it would appear that the option was bought taking liquidity from an existing quote (an active order traded against a passive quote).
If instead a bid was posted on the book, and was later hit, then that would indicate the buy was passive and the sell was active.
You may find instances where the trade price is better than the displayed price on BATS Options and NASDAQ options as those exchanges allow 'penny pricing' even though the displayed prices are rounded to 5 cent increments.
Open or Close
Whether or not it was a buy to open or buy to close would depend on the open interest at the end of the day, which may not have sufficient to work out. If the market maker who posted the quote was selling from his inventory, the open interest would be unchanged. If the market maker was writing the option, the open interest would increase.
Open interest information is available from the OCC (and through OPRA) at the end of each day. The daily volume is also broken down by Customer (retail), Firm (proprietary trading firms) and Market Makers. You may be able to deduce what happened from the sizes, but if the security was traded heavily, it may be difficult to figure out what happened (there may be multiple scenarios that fit the data).