In respect of a single day, day $i$, consider the four compound events:
- A occurred and B occurred.
- A occurred and B did not.
- A didn't occur and B did.
- Neither A nor B occurred.
For each day, one of those four situations occurs.
Knowledge of all four can be used to decide whether the occurrence of A and B are dependent (either positively related or negatively).
To clarify notation, let $X_i=1$ if $A$ occurs on day $i$ and $=0$ otherwise. Let $Y_i=1$ if $B$ occurs on day $i$ and $=0$ otherwise.
If we further assume that there's independence across days -- that $P(X_i=1|X_j=1)=P(X_i|X_j=0)$ for all $j\neq i$, and similarly for conditioning on $Y_j$ and for conditioning on combinations of $X_j$ and $Y_k$.$^\dagger$
In that case we can use a test for independence. The most commonly used one is the chi-squared test.
Let $Z_{lm}(i)=1$ if $X_i=l$ and $Y_i=m$ for $l=(0,1)$ and $m=(0,1)$.
That is, let $Z_{00}(i)=1$ if $X_i=0$ and $Y_i=0$, and so on.
Further, let $O(l,m) = \sum_i Z_{lm}(i)$, so that the $O$ values represent the counts of how often each combination of A or not-A co-occurs with B or not-B
Then construct a contingency table:
(not-B) (B)
Y=0 Y=1
(not-A) X=0 O(0,0) O(0,1)
(A) X=1 O(1,0) O(1,1)
Then this data is in suitable form for a chi-square, or a G-test or a Fisher-Irwin test (of which the chi-square is the best-known). An alternative would be a two-sample proportions test (say as a Z-test).
$\dagger$ [This may be too strong an assumption, in which case some alternative analysis that deal with the time dependence needs to be used]